Search found 565 matches

by bogglez
Fri Oct 10, 2014 9:43 pm
Forum: Programming Discussion
Topic: 4kb Rotating Cube Demo
Replies: 43
Views: 4725

Re: 5k Rotating Cube Demo

The pvr API is lower level than the GL library and exposes the GPU capabilities directly, so it makes sense to use it. Still, I wouldn't call the GL library a wrapper, it does a lot of extra things for you, clipping and multi-texturing for example. If it doesn't suit your needs yet you should try to...
by bogglez
Sun Oct 05, 2014 7:46 am
Forum: Front Page News and Forum Guidelines
Topic: New Open GL API Released
Replies: 65
Views: 26649

Re: New Open GL API Released

Good Afternoon. I've checked out the latest version of the API, but now I get the following error : /home/jaerder/development/Tools/dreamcast/kallistios/utils/bin2o/bin2o romdisk.img romdisk romdisk.o kos-cc -o bin/main.elf bin/asset_loader.o bin/data_estructures.o bin/dc_render.o bin/fnt_parser.o ...
by bogglez
Tue Sep 30, 2014 12:46 pm
Forum: Front Page News and Forum Guidelines
Topic: New Open GL API Released
Replies: 65
Views: 26649

Re: New Open GL API Released

Why does get active texture always return 0? GL_ACTIVE_TEXTURE params returns a single value indicating the active multitexture unit. The initial value is GL_TEXTURE0. See glActiveTexture. Problem is, the PVR does not support multi-texture in hardware. Basically, that means we need to transform/sub...
by bogglez
Mon Sep 29, 2014 2:45 am
Forum: Front Page News and Forum Guidelines
Topic: New Open GL API Released
Replies: 65
Views: 26649

Re: New Open GL API Released

Nice release! I will also get back to GL dev soon. I'm just really busy at work now. :(
I like that you replaced custom functions with standard ones.
Why does get active texture always return 0?
by bogglez
Sun Sep 07, 2014 12:41 pm
Forum: Programming Discussion
Topic: Long tristrips slow on PVR?
Replies: 5
Views: 757

Re: Long tristrips slow on PVR?

Ah yeah I just remembered you added that glEnable flag! You got me there :D
by bogglez
Sun Sep 07, 2014 9:59 am
Forum: Programming Discussion
Topic: Open GL API Error Reporting
Replies: 50
Views: 9047

Re: Open GL API Error Reporting

void glNormalPointer(GLenum type, GLsizei stride, const GLvoid * pointer) doesn't take a size argument, normals always have 3 components.

The example basic/elements/main.c needs to be fixed in this regard, too.
glNormalPointer(3, GL_FLOAT, 0, NORMAL_ARRAY);
by bogglez
Sun Sep 07, 2014 5:48 am
Forum: Programming Discussion
Topic: Long tristrips slow on PVR?
Replies: 5
Views: 757

Re: Long tristrips slow on PVR?

But that brings up an interesting link to Microsoft's Developer Network about optimizing code for WinCE on DC. http://msdn.microsoft.com/en-us/library/ms834190.aspx Now that sounds completely opposite of what I quoted before.. Send as many vertices as possible in a single DrawPrimitive call. This i...
by bogglez
Sat Sep 06, 2014 3:39 pm
Forum: Programming Discussion
Topic: Long tristrips slow on PVR?
Replies: 5
Views: 757

Long tristrips slow on PVR?

Somebody on http://www.pouet.net/prod.php?which=54656 wrote when you generate strips you don't want the longest possible strips (in my experience 6 to 15 triangles is the optimal size) because the final rendering performance is dependent on the number of tiles covered by the bounding rectangle occup...
by bogglez
Tue Sep 02, 2014 1:09 am
Forum: Programming Discussion
Topic: CFLAGS chosen for kos
Replies: 7
Views: 1106

Re: CFLAGS chosen for kos

Why is -fno-strict-aliasing used for KOS?
Since this has serious performance implications I assume you're fighting gcc bugs again or KOS involves lots of code ignoring the strict aliasing rule?
by bogglez
Mon Sep 01, 2014 5:24 pm
Forum: Programming Discussion
Topic: sq_cpy and pvr_scene_begin_txr
Replies: 2
Views: 373

sq_cpy and pvr_scene_begin_txr

Two quick questions: - Why is the src argument in void * sq_cpy(void *dest, void *src, int n) not const? Can sq_cpy change src? - Why does void pvr_scene_begin_txr(pvr_ptr_t txr, uint32 *rx, uint32 *ry) take pointers as arguments? Is something written back to them? I assumed by value passing at first.
by bogglez
Sat Aug 30, 2014 11:17 am
Forum: Programming Discussion
Topic: CFLAGS chosen for kos
Replies: 7
Views: 1106

Re: CFLAGS chosen for kos

As for the warning on printf("%f", 0.0f), that's because printf("%f", ...) assumes that the argument passed is a double -- cast your argument properly and you won't get that warning. That said, that warning is awfully silly, since the C standard says exactly what should happen i...
by bogglez
Sat Aug 30, 2014 7:06 am
Forum: Programming Discussion
Topic: CFLAGS chosen for kos
Replies: 7
Views: 1106

CFLAGS chosen for kos

Hey, I stumbled upon a bug recently that made me take a closer look at the chosen CFLAGS for kos (kos-cc -v). Configured with: ../gcc-4.7.3/configure --target=sh-elf --prefix=/opt/toolchains/dc/sh-elf --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls --with-multilib...
by bogglez
Fri Aug 29, 2014 11:09 am
Forum: Programming Discussion
Topic: Issues with render to texture.
Replies: 3
Views: 575

Re: Issues with render to texture.

PH3NOM, When you say vertex buffer you mean frame buffer, right?
by bogglez
Sun Aug 17, 2014 11:26 am
Forum: Front Page News and Forum Guidelines
Topic: New Open GL API Released
Replies: 65
Views: 26649

Re: New Open GL API Released

Congratulations and thanks for the work!
Unfortunately I'm too busy to play around with this right now, but I will try to once I have more free time. It also really makes me want to dev on the DC instead of in an emulator.. I will have to figure out where to get cables and such :-)
by bogglez
Thu Aug 14, 2014 8:51 am
Forum: Programming Discussion
Topic: Quake 3 lightmaps - PVR Multi-Texture
Replies: 106
Views: 23650

Re: Quake 3 lightmaps - PVR Multi-Texture

I think if you factor in animations, sounds, game logic and physics (and texturing to a lesser extent), the CPU time can go up quite dramatically. As it is you would only be allowed to add 12ms to still hit 30 FPS. Where do the 16ms CPU time come from exactly? Are you by chance repeating the same tr...
by bogglez
Wed Aug 06, 2014 12:24 am
Forum: Programming Discussion
Topic: Quake 3 lightmaps - PVR Multi-Texture
Replies: 106
Views: 23650

Re: Quake 3 lightmaps - PVR Multi-Texture

I was wondering whether you can replace those 8 dot products with two matrix multiplications to gain some speed. Put the vectors on the right side into the matrix and multiply it by cv, then do the if checks after the matrix multiplication (or just write "bbox_in = result[0] > 0 + result[1] > ...
by bogglez
Tue Aug 05, 2014 5:24 am
Forum: Programming Discussion
Topic: Quake 3 lightmaps - PVR Multi-Texture
Replies: 106
Views: 23650

Re: Quake 3 lightmaps - PVR Multi-Texture

byte Q3BSP_LeafIsVisible(Q3_BSP_LEAF *leaf, vector3f *cam, vector3f *cv) { float dot; byte bbox_in = 0; vec3f_dot(cv->x, cv->y, cv->z, cam->x - leaf->mins[0], cam->y - leaf->mins[1], cam->z - leaf->mins[2], dot); if(dot > 0) ++bbox_in; vec3f_dot(cv->x, cv->y, cv->z, cam->x - leaf->mins[0], cam->y -...
by bogglez
Mon Aug 04, 2014 12:59 pm
Forum: Programming Discussion
Topic: Quake 3 lightmaps - PVR Multi-Texture
Replies: 106
Views: 23650

Re: Quake 3 lightmaps - PVR Multi-Texture

PVS System ? What's a PVS system ? http://en.wikipedia.org/wiki/Potentially_visible_set BSP has a very efficient data structure to reduce the amount of polygons you need to render depending on the view point. If ph3nom were to implement the visibility tests, he would be able to render much bigger a...
by bogglez
Sat Aug 02, 2014 7:58 am
Forum: Programming Discussion
Topic: Random WIP shots
Replies: 35
Views: 9039

Re: Random WIP shots

This reminds me to get my obj loader to output indexed vertex arrays since my actual vertex arrays are unindexed. Does anyone know a good algorithm to do so ? Your OBJ loader will create a vertex buffer (coordinate, normal, uv) and an element array buffer (indices). In OBJ's f command you will find...