Add textured materials to render context, and refactor mjvGeom to refer to those textures.

PiperOrigin-RevId: 648719103
Change-Id: Idb4425bdeea3cbc1133cda3e4366574ed3bb5ccc
This commit is contained in:
Tom Erez
2024-07-02 08:00:06 -07:00
committed by Copybara-Service
parent af3233f98d
commit 3b73dfe33b
14 changed files with 252 additions and 195 deletions
+29 -18
View File
@@ -5483,14 +5483,9 @@ STRUCTS: Mapping[str, StructDecl] = dict([
doc='visual category',
),
StructFieldDecl(
name='texid',
name='matid',
type=ValueType(name='int'),
doc='texture id; -1: no texture',
),
StructFieldDecl(
name='texuniform',
type=ValueType(name='int'),
doc='uniform cube mapping',
doc='material id; -1: no textured material',
),
StructFieldDecl(
name='texcoord',
@@ -5502,14 +5497,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='segmentation id; -1: not shown',
),
StructFieldDecl(
name='texrepeat',
type=ArrayType(
inner_type=ValueType(name='float'),
extents=(2,),
),
doc='texture repetition for 2D mapping',
),
StructFieldDecl(
name='size',
type=ArrayType(
@@ -7957,7 +7944,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
StructFieldDecl(
name='offDepthStencil_r',
type=ValueType(name='unsigned int'),
doc='offscreen depth and stencil buffer for resolving multisamples', # pylint: disable=line-too-long
doc='offscreen depth and stencil buffer for multisamples',
),
StructFieldDecl(
name='shadowFBO',
@@ -8001,6 +7988,30 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='auxiliary color buffer for resolving',
),
StructFieldDecl(
name='mat_texid',
type=ArrayType(
inner_type=ValueType(name='int'),
extents=(600,),
),
doc='material texture ids (-1: no texture)',
),
StructFieldDecl(
name='mat_texuniform',
type=ArrayType(
inner_type=ValueType(name='int'),
extents=(100,),
),
doc='texture repetition for 2d mapping',
),
StructFieldDecl(
name='mat_texrepeat',
type=ArrayType(
inner_type=ValueType(name='int'),
extents=(200,),
),
doc='texture repetition for 2d mapping',
),
StructFieldDecl(
name='ntexture',
type=ValueType(name='int'),
@@ -8035,12 +8046,12 @@ STRUCTS: Mapping[str, StructDecl] = dict([
StructFieldDecl(
name='baseHField',
type=ValueType(name='unsigned int'),
doc='all hfields from model',
doc='all height fields from model',
),
StructFieldDecl(
name='baseBuiltin',
type=ValueType(name='unsigned int'),
doc='all buildin geoms, with quality from model',
doc='all builtin geoms, with quality from model',
),
StructFieldDecl(
name='baseFontNormal',