Good to know, thanks. In what scenario do you typically need to convert image data that way at runtime?by antibyte - Coding
Thanks for the information, Tueidj! Good to know that DCFlushRange is not necessary in this scenario. I thought I needed to force writeback from cache. As I have never redirected the write gather pipe, I have never run into issues when using displaylists. So if you don't mess with the write gather pipe, displaylists are still the way to go in terms of performance EDIT: I remember nowby antibyte - Coding
Yes, there are a few pitfalls when using display lists, however the second one is not a bug, since it is documented behaviour in libogc and the official manual. Basically it works like this: * allocate memory aligned to 32bytes with a size multiple of 32 bytes + 32 bytes for padding (will be filled with GX_NOP, i.e. zero). So memory inflation will be a max of 63 bytes, which is neglectable inby antibyte - Coding
Just some general tips concerning rendering: Use vertexbuffers (GX_SetArray) and displaylists (GX_CallDisplayList, ...) whereever possible, because immediate rendering like in your example does not utilize the Wii's vertex cache and wastes CPU cycles. Even if you don't want to use displaylists, use vertexbuffers, since it greatly reduces CPU load as only the index (instead of all verby antibyte - Coding
QuoteowenI use programmers notepad Thanks for your answer, Owen. Unfortunately I dropped support for Programmers Notepad, because I could not configure its "Project Tools" on a per project basis, only globally, which means there's no way use this with version control software properly. It also does not know about project dependencies, let alone use different make parameters per project, etby antibyte - Coding
That's true. But going long distance with cargo leaves little alternatives.by antibyte - Coding
QuotetueidjNo, regular notepad. Feels like using a tricycle instead of a car, but to each their own. :)by antibyte - Coding
QuotetueidjNotepad. As in Programmer's Notepad?by antibyte - Coding
Judging from the lack of responses, using Visual Studio doesn't seem to be very common amongst Wii Homebrew developers. So please tell me, what do you use?by antibyte - Coding
Which version of Visual Studio do you use? The reason I am asking this is because I want to drop support for Visual Studio 2005/2008 in Wire3D. I added support for Visual Studio 2010, 2012 and 2013 and would like to simplify maintenance of the project files.by antibyte - Coding
Sorry, I'm not using CodeBlocks, but Visual Studio as my front-end, so I cannot comment on that part. But if you want to test if devkitpro was properly installed, I suggest you run a makefile of the examples that come with devkitpro from commandline and see if it compiles fine.by antibyte - Coding
QuotefilfatQ: can I in someway set the Arc's? Using this metod. As I am not a psychic, I have no clue what you are talking about (as usual ;) )by antibyte - Coding
I'm not sure what you are talking about exactly. I have linked third party C code with my C++ framework several times without any issues. Do you care to elaborate on that gcc/devkitppc bug?by antibyte - Coding
C is a subset of C++, you should have no problem linking C code to C++, so I guess the problem is in your makefile.by antibyte - Coding
Quotefilfat EDIT 2: The code dosent work in C++ Thats why i got these errors XD You know that this is a linker error, and the code did compile, right?by antibyte - Coding
Quoteowen@antibyte I still have not figured out how that vertex array works! Come on, Owen. We have been through this! You're a smart guy and you have all the info, I bet you didn't really try. :) QuoteowenI am trying to move the view two times in a single frame. Taking a screen shot each time. That's what the code above is doing but the second screenshot does not receive newby antibyte - Coding
QuoteowenIt is often faster to hardcode the vertex positions for things you draw often. If you draw things often, you should not use hardcoded vertex positions, since this cannot utilize the Wii's vertex cache. You should use vertex buffers (i.e. GX_SetArray() ) instead, they are faster. QuoteowenI was experimenting with drawing a view then taking a screenshot, then moving the camera anby antibyte - Coding
Sorry, I don't know how it's done using GRRLIB. In Wire3D you simply do a 'SetViewport(left, right, top, bottom)' on the Camera to render to a rectangle on screen defined by the given values (ranging [0,1]). In GX, you have to use GX_SetViewport/GX_SetViewportJitter and GX_SetScissor to set it up.by antibyte - Coding
Filfat is using this for his Minecraft clone, meaning he is applying the texture to 3D objects. GRRLIB_DrawTileQuad is only for 2D objects. I would recommend handling textures yourself instead of GRRLIB, because GRRLIB does not handle mipmaps and texture filtering (which causes flickering/aliasing for distant objects).by antibyte - Coding
Yep, I'm not blaming GRRlib itself. I'm just pointing out that one would have to implement aforementioned features oneself in order to get decent perfomance (which is a prerequisite for rendering larger scenes). Anyways, sorry for going off-topic. :)by antibyte - Coding
QuoteowenI tried doing a game like this but I could never get good draw distances so I gave up. That's partly because GRRLib is not really suitable for high performance rendering. It does not support GX DisplayLists, meaning all rendering is done in immediate mode, which seriously wastes CPU time. What's worse is the fact, that it also does not support VBOs (all rendering is done usby antibyte - Coding
Sorry, I am not going to spoon feed you. :) The basic concept is explained in that thread and the sample. It's up to you to put a little effort in extracting the information you need for your particular scenario.by antibyte - Coding
This has been dealt with in the following thread. As you can see from the video in this thread, there's an example of how to do in Wire3D's 'game' sample, if you want to have a look at the source code to see how it's done exactly. (you need to check out the SVN repository, that sample is not part of Wire3D 1.0.2)by antibyte - Coding
SifJar is right, just pass the pointer.... or store it as a member in your drawcube class. Loading and Freeing on a drawcall basis is just not the way to do this.by antibyte - Coding
Quotefilfatwont work: error: 'terrain2' was not declared in this scope That's a compiler error. Make it work. ;)by antibyte - Coding
I'm not using grrlib myself, but after taking a quick look at GRRLIB_LoadTexture(), it seems to check if the texture is a png, jpg or bmp and then decompresses it on the fly. If this is what happens, then you should not call it on a drawcall basis. Call it once at initialization time and then only set the texture using GRRLIB_SetTexture()by antibyte - Coding
Could you also please post the cube.drawcube_save() code? :)by antibyte - Coding
If "cube.drawcube_save(x,z,y);" is not the culprit, then it seems like your 3 dimensional array is not suitable for traversing your world. Maybe try an Octree instead. Depending on what you want to do with it.by antibyte - Coding
It's hard to tell without looking at it closely, so I'll just give it a shot: you iterate 32^3 times to draw one cube. What happens if you draw that one cube without iterating over that 32768 array?by antibyte - Coding
This particular image is a 32bit png, so you need to decode it in your application first. After that you have an array of 256*256*4 bytes. There are 16x16 blocks in this image. You get the start address of a block like that: unsigned char* pImage = DecodePNG(...whatever arguments needed...); // get block in row 12, column 13 int xb = 13; int yb = 12; unsigned cby antibyte - Coding