From: Brian P. <br...@tu...> - 2002-10-09 16:54:34
|
Lars Ivar Igesund wrote: > ----- Original Message ----- > From: "Brian Paul" <br...@tu...> > >>2. Define the new data structures for programs, program parameters, etc. >>(mtypes.h) > > > mtypes.h already has a lot of variables that is used by NV_vertex_program. > Several of those can be used as is by ARB_vertex_program as the extensions > are very similar. Others should not be used by both, since the they are > not totally compatible. The variables already there have received very > general names ( as the boolean VertexProgram ). Should I change this to > VertexProgramNV and add VertexProgramARB? As far as I can discern > from the ARB spec, both can be enabled at the same time and the > vertex_program_state of NV can be used to access the registers used by > the ARB implementation. > > Other examples are vp_opcodes, vp_src_register, etc. > > Then it is the question of the program parameters. In NV there are 96 > of them. In ARB there are 96 local and 96 global, though as far as > I understand, there only needs to be 96 in total. These numbers are > specified with a + after them, so they can obviously be larger. Any > opinions for this? I was thinking of having 96 of each, making it a total > of 192 (which is available on some newer hardware). Hi Lars, The ARB_vertex_program spec has a section describing how the extension should interact with NV_vertex_program. I only skimmed it so far. I'm pretty sure of this much: When two state names, such as GL_VERTEX_PROGRAM_ARB and GL_VERTEX_PROGRAM_NV, share the same token value (0x8620) then there should be one variable in mtypes. Otherwise, separate variables _may_ be needed. Suffixing them with "NV" and "ARB" is good. "vp_opcodes", should probably become "nv_vp_opcodes", etc to distinguish the extension/language. When we get to ARG_fragment_program we might have "arb_fp_opcodes". Regarding program parameters, 96 of each sounds fine with me. If we write good code, we can change them arbitrarily if needed. -Brian |